package org.eden.rpc.service;

import org.eden.rpc.common.service.UserService;
import org.eden.rpc.common.service.blog.ArticleService;
import org.eden.rpc.common.service.blog.TagService;
import org.eden.rpc.core.server.NettyServer;
import org.eden.rpc.core.server.RpcServer;
import org.eden.rpc.core.server.ServiceRegisterHolder;
import org.eden.rpc.service.serviceImpl.UserServiceImpl;
import org.eden.rpc.service.serviceImpl.blog.ArticleServiceImpl;
import org.eden.rpc.service.serviceImpl.blog.TagServiceImpl;

public class ServerApp {
    public static void main(String[] args) {
        ArticleService articleService = new ArticleServiceImpl();
        UserService userService = new UserServiceImpl();
        TagService tagService = new TagServiceImpl();
        ServiceRegisterHolder.getServiceRegister().register(articleService);
        ServiceRegisterHolder.getServiceRegister().register(userService);
        ServiceRegisterHolder.getServiceRegister().register(tagService);
        RpcServer server = new NettyServer();
        server.start(8888);
    }
}
